<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0064)http://www.wizzud.com/jqDock/examples/example.centre_bottom.html -->
<HTML xmlns="http://www.w3.org/1999/xhtml">
    <HEAD>
    <base href="<%=basePath%>">
        <TITLE>
        <s:if test="userDetial.username!=''">
<s:property value="userDetial.username"/>
</s:if>
<s:else>
<s:property value="userDetial.eusername"/>
</s:else>
          资讯－<s:property value="singleBrand.title"/>
        </TITLE>
        <META content="text/html; charset=utf-8" http-equiv=Content-Type>
        <link href="css/style.css" rel="stylesheet" type="text/css" />
       <link href="css/css1.css" rel="stylesheet" type="text/css" />
        <link href="css/imageview.css" rel="stylesheet" type="text/css" />
        <SCRIPT type=text/javascript src="js/tools/jquery-1.4.2.min.js">
        </SCRIPT>
        
       
      
       
        <SCRIPT type=text/javascript>
          $(document).ready(function(){
            $("#descri img").removeAttr("width");
            $("#descri img").removeAttr("height");
            $("#descri img").attr("style","max-width:582px;max-height:582px;width:expression(this.width > 582 && this.width > this.height ? 582 : true); height: expression(this.height > 582 ? 582 : true)")
          });
           
            
           
              function startSubmit()
			  {
			    var login='<s:property value="#session.user"/>';
			   
			    if(login!="")
			    {
			    var content=$.trim($("#content").val());
			    if(content.length<=1||content.length>300)
			    {
			       alert("评论字数必须在1到300之间!");
			    }else
			    {
			      $("#form").submit();
			    } 
			    }else
			    {
			       alert("请登录！");
			    }
			  }
        </SCRIPT>
       
    </HEAD>
    <BODY>
        
        <div class="container">

<jsp:include page="../head.jsp"/>
<div class="ge"></div>

<div class="content">

<div class="wrapp">
<div class="album_left"> 
<a href="user/user!brandUserPage.action?currentPage=1&userId=<s:property value='users.id'/>">
                     <s:if test="userDetial.image.equals('')">
				          <img src="images/img.gif"  class="img4"  />
				      </s:if>
				      <s:else>
				         <img src="uploadFile/<s:property value="userDetial.image"/>" class="img4"  />
		              </s:else>
		              </a>
		 </div>
<div class="album_right">
<div class="album_ding"><a >
<s:if test="userDetial.username!=''">
			        <s:property value='userDetial.username'/>
				</s:if>
				<s:elseif test="userDetial.eusername!=''">
				    <s:property value='userDetial.eusername'/>
				</s:elseif>
				<s:else>
				    <s:property value='users.email.substring(0,users.email.indexOf("@"))'/>
				</s:else>

的资讯</a></div>
<div class="album_di">
<a href="user/user!brandUserPage.action?currentPage=1&userId=<s:property value='users.id'/>" target="_parent">首页</a>&nbsp;&nbsp;
<a href="user/branduser!picturesList.action?currentPage=1&userId=<s:property value='users.id'/>" target="_parent">相册</a>&nbsp;&nbsp;
<a href="user/branduser!brandInforAllList.action?currentPage=1&userId=<s:property value="users.id"/>" target="_parent">资讯</a>&nbsp;&nbsp;
<a href="user/branduser!topicList.action?currentPage=1&userId=<s:property value="users.id"/>" target="_parent">论坛</a>&nbsp;&nbsp;
<a href="user/user!myFriendList.action?currentPage=1&userId=<s:property value="users.id"/>" target="_parent">友邻</a>&nbsp;&nbsp;
<a href="user/user!myCriticism.action?currentPage=1&userId=<s:property value="users.id"/>" target="_parent">评论</a>
</div>
</div>
<div class="clear"></div>
</div>

<div class="wrap">


      <div class="left">
	     <div class="boxb">
		      <div class="boxb_top">
		           <span class="pin1"><s:property value="singleCategory.categoryName"/></span>
		           <div class="pin2"><s:property value="singleBrand.title"/></div>
			  </div>
			  <div class="boxb_con" style="height: auto;">
			     <div class="dd"><s:property value="singleBrand.datetime.substring(0,10)"/></div>
				  <div id="descri">
				 &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<s:property value="singleBrand.content" escape="false"/>
				 </div>
			  </div>
		 </div>
		
		 <div class="box3">  
		   
			  <div class="box3_con">
			  <ul class="ul2">
			      <s:iterator value="#request.criticismList" id="id" status="status">
			      
									    <s:set name="urlContent"><s:property value="#id[7]"/></s:set>
									     <s:if test="#id[6]==2">
					                      <s:set name="urlPath">user/user!singleUserPage.action?currentPage=1&userId=<s:property value="#id[5]"/></s:set>
									   </s:if>
									   <s:elseif test="#id[6]==3">
									      <s:set name="urlPath">user/user!groupbyUserPage.action?currentPage=1&userId=<s:property value="#id[5]"/></s:set>
									   </s:elseif>
									   <s:elseif test="#id[6]==4">
									      <s:set name="urlPath">user/user!brandUserPage.action?currentPage=1&userId=<s:property value="#id[5]"/></s:set>
									   </s:elseif>
								       <li>
										<div class="pic">
										   <a href="<s:property value="urlPath"/>">
											<s:if test="#id[3].equals('')">
					                 			<img src="uploadFile/img.gif" width=60 height=60/>
								            </s:if>
								            <s:else>
								                 <img src="uploadFile/<s:property  value="#id[3]"/>" width=60 height=60/>
								            </s:else>
								           </a>
										</div>
										<div class="info">
											<div class="xin">
												<table width="100%" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td width="65%" align="center" valign="middle">
															<s:property value="#id[2]"/>
														</td>
														<td width="35%" align="left" valign="middle">
															<a href="<s:property value="urlPath"/>" class="ziti"><s:property value="#id[4]"/>
														</td>
													</tr>

												</table>

											</div>
											
											  
											    &nbsp;&nbsp;&nbsp;&nbsp;<s:property value="#id[1]"/>
											 
											
										</div>
										<!--end info-->
										<div class="clear"></div>
									  </li>
									 
								   </s:iterator>
				  
               </ul>

		</div>
		</div>
		 <div class="ye">
		 <s:if test="#request.criticismList.size()!=0">
		      <s:set name="pageUrl" >user/branduser!singleBrand.action?category=${category }&brandId=${brandId }&currentPage=</s:set>
		      <a href="${pageUrl}1">第一页</a>&nbsp;&nbsp;<a href="${pageUrl}<s:property value="#request.pages.prePage"/>">上一页</a>&nbsp;&nbsp;
		      <s:set name="totalPage" value="#request.pages.totalPage"></s:set>
		      <s:set name="currentPage" value="#request.pages.currentPage"></s:set>
							   <s:if test="#currentPage<=0">
							      <s:set name="currentPage" value="1"></s:set>
							   </s:if>
							   <s:elseif test="#currentPage>#totalPage">
							      <s:set name="currentPage" value="#totalPage"></s:set>
							   </s:elseif>
							   
							   <s:if test="#totalPage%6>0">
							       <s:set name="pageSize" value="#totalPage/6+1"></s:set>
							   </s:if>
							   <s:else>
							       <s:set name="pageSize" value="#totalPage/6"></s:set>
							   </s:else>
							  
							   
							   <s:if test="#currentPage%6>0">
							       <s:set name="cPageSize" value="#currentPage/6+1"></s:set>
							   </s:if>
							   <s:else>
							       <s:set name="cPageSize" value="#currentPage/6"></s:set>
							   </s:else>
							   
							   <s:set name="first" value="6*(#cPageSize-1)"></s:set>
							   <s:if test="#first==0">
							      <s:set name="first" value="1"></s:set>
							   </s:if>
							   <s:set name="last" value="#cPageSize*6"></s:set>
							   <s:if test="#last>#totalPage">
							      <s:set name="last" value="#totalPage"></s:set>
							   </s:if>
				
							     <s:bean name="org.apache.struts2.util.Counter" id="counter"> 
							       <s:param name="first" value="#first"/>
							       <s:param name="last" value="#last" />
							       <s:iterator status="status"> 
							         <s:if test="#currentPage==(#status.index+#first)">
							            &nbsp;&nbsp;<s:a href="%{pageUrl}%{#status.index+#first}" cssStyle="background-color:#982987;color:#FFFFFF; padding-right:3px; padding-left:3px;" ><s:property value="#status.index+#first" /></s:a>
							         </s:if>
							         <s:else>
							            &nbsp;&nbsp;<s:a href="%{pageUrl}%{#status.index+#first}" ><s:property value="#status.index+#first" /></s:a>
							         </s:else>
							       </s:iterator> 
							     </s:bean>
							     <s:if test="#last<#totalPage">
							       ......&nbsp;
							     </s:if>
		      <a href="${pageUrl}<s:property value="#request.pagesCriticism.nextPage"/>">下一页</a>&nbsp;&nbsp;<a href="${pageUrl}<s:property value="#request.pagesCriticism.totalPage"/>">最后一页</a>
		   </s:if> 
	   </div> 
		
		<div class="discuss">
		    <div class="discuss_top">添加评论
			</div>
			<form id="form" action="user/branduser!addBrandCriticism.action" method="post">
			   <input type="hidden" name="currentPage" value="1"/>
			   <script > $(document).ready(function(){$("input[name='url']").val(location.href);})</script>
			<input type="hidden" name="url" />
			   <input type="hidden" name="category" value="<s:property value="category"/>"/>
			   <input type="hidden" name="brandId" value="<s:property value="brandId"/>"/>
			   <div class="discuss_con"><textarea rows="2" class="texta" name="content" id="content"></textarea>
				</div>
				<div class="discuss_bot"><img src="images/discuss.jpg" onclick="startSubmit()"/>
				</div>
			</form>
			
		</div>
</div>	  

		
		
		
	  </div>
	 
	<div class="clear"></div>
	  
	 
	  
    </div>
	
	  
</div>


<div id="foot"><jsp:include page="../bot.jsp"></jsp:include></div>


</div>
    </BODY>
</HTML>
<script type="text/javascript">var cpro_id = 'u243201';</script>

